package com.km.team.phsystem.beans.vo;

import com.km.team.phsystem.beans.pojo.QueueInfo;

import java.io.Serializable;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;

/**
 * @author ：Riven.
 * @description：排号信息组合类
 * @date ：2018/12/1
 */
public class QueueCombinedInformationVo implements Serializable {

    private QueueInfo queueInfo;
    private Integer datePhConfigId;
    /**
     * 预约日期
     */
    private Date date;
    private Integer timeSlotPhConfigId;
    /**
     * 开始时段和结束时段
     */
    private String startTime;
    private String endTime;

    private Integer businessId;
    private String businessType;


    @Override
    public String toString() {
        return "QueueCombinedInformationVo{" +
            "queueInfo=" + queueInfo +
            ", datePhConfigId=" + datePhConfigId +
            ", date=" + date +
            ", timeSlotPhConfigId=" + timeSlotPhConfigId +
            ", startTime='" + startTime + '\'' +
            ", endTime='" + endTime + '\'' +
            ", businessId=" + businessId +
            ", businessType='" + businessType + '\'' +
            '}';
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public QueueInfo getQueueInfo() {
        return queueInfo;
    }

    public void setQueueInfo(QueueInfo queueInfo) {
        this.queueInfo = queueInfo;
    }

    public Integer getDatePhConfigId() {
        return datePhConfigId;
    }

    public void setDatePhConfigId(Integer datePhConfigId) {
        this.datePhConfigId = datePhConfigId;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(String date) {
        LocalDate parse = LocalDate.parse(date);
        ZoneId zone = ZoneId.systemDefault();
        Instant instant = parse.atStartOfDay().atZone(zone).toInstant();
        this.date = Date.from(instant);
    }

    public Integer getTimeSlotPhConfigId() {
        return timeSlotPhConfigId;
    }

    public void setTimeSlotPhConfigId(Integer timeSlotPhConfigId) {
        this.timeSlotPhConfigId = timeSlotPhConfigId;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
